{include file="pageheader_erp.htm"}

{include file="erp_stock_search.htm"}

{insert_scripts files="../js/jquery.1.3.2.js"}
{insert_scripts files="../js/jquery.blockUI.2.23.js"}

<style type="text/css">
	.current_page_style
	{
		color:red;
		font-weight:bold;
	}
	.tb_warehouse
	{
		margin:0px auto;
		width:100%;
		border:none;
	}
	.tb_warehouse td
	{
		border-right:1px solid #EEF8F9;
		border-bottom:1px solid #EEF8F9;
		margin:0px auto;
		text-align:center;
	}	
	
	.tb_size
	{
		margin:0px auto;
		width:100%;
		border-top:none;
		border-left:none;
		border-bottom:none;
		border-right:none;		
	}	
	
	.tb_size td
	{
		margin:0px auto;
		border-bottom:1px solid #EEF8F9;
		border-right:1px solid #EEF8F9;
		
		border-top:none;
		border-left:none;	
	}	
	.tb_warehouse_last_row td
	{
		border-bottom:none;
	}	
	.tb_size_last_row td
	{
		border-bottom:none;
	}
	
</style>

<script type="text/javascript">
	$(document).ready(function(){

		
		
	});
	
</script>

<!-- start stock list -->
<div class="list-div" id="listDiv">
<table  cellpadding="3" cellspacing="1">
  <tr>
    <th width="5%">{$lang.erp_stock_goods_id}</th>
    <th width="100">{$lang.erp_stock_goods_img}</th>
	<th>{$lang.erp_stock_goods_sn}</th>
	
	<th width="30%">{$lang.erp_stock_goods_name}</th>
	<th>{$lang.erp_stock_warehouse_attr_qty}</th>
  </tr>
  {foreach from=$stock_info key=key item=stock_info}
  <tr>
  	<td align="center">{$stock_info.goods_info.goods_id}</td>
	<td align="center"><img width="100" height="100" src="{if $stock_info.goods_info.goods_img}{$stock_info.goods_info.goods_img}{else}images/no_img.gif{/if}" /></td>
	<td align="center">{$stock_info.goods_info.goods_sn}</td>  
 
	<td>{$stock_info.goods_info.goods_name}</td>    
	<td align="center">
		<table class="tb_warehouse" cellspacing="0" height="100">
			{foreach name=wrap1 from=$stock_info.warehouse key=key item=warehouse}
				<tr {if $smarty.foreach.wrap1.iteration eq $smarty.foreach.wrap1.total}class="tb_warehouse_last_row"{/if}>
					<td width="150">{$warehouse.warehouse_info.warehouse_name}</td>
					<td style="border-right:none;">
						<table class="tb_size" cellspacing="0" height="100">
							{foreach name=wrap2 from=$warehouse.attr key=key item=attr}
								<tr {if $smarty.foreach.wrap2.iteration eq $smarty.foreach.wrap2.total}class="tb_size_last_row"{/if}>
									<td width="50%">
										{if $attr.attr_value}
										{foreach from=$attr.attr_value.attr_info key=key item=at}
											{$at.attr_value}
										{/foreach}
										{else}
											$$
										{/if}
									</td>
						
									<td style="border-right:none;">
										{$attr.qty}
									</td>
								</tr>
							{/foreach}
						</table>
					</td>
				</tr>
			{/foreach}
		</table>
	</td> 
  </tr> 
  {foreachelse}
  <tr><td class="no-records" colspan="5">{$lang.no_records}</td></tr>
 {/foreach}
  <tr><td colspan="5" align="right">{$page}</td></tr> 
</table>
</div>
<!-- end stock list -->

{literal}
<script language="JavaScript">
 
</script>
{/literal}
{include file="pagefooter.htm"}

